import React from "react";
import '@/style/css/footer.css'

const TabBar = () =>
{
    // 获取location的pathname
    const { pathname } = useLocation();

    const [active] = useState<string>(pathname);

    return (
        <>
            
            <div className="footer">
                <React.UI.TabBar activeKey={active} onChange={(key:string) => React.navigate(key)}>
                    <React.UI.TabBar.Item
                        key={'/'}
                        icon={React.Icons.AppstoreOutline}
                        title={'首页'}
                    />
                    <React.UI.TabBar.Item
                        key={'/business'}
                        icon={React.Icons.UserOutline}
                        title={'我的'}
                    />
                </React.UI.TabBar>
            </div>
        </>
    )
}

export default TabBar;